import random
import requests
from Detail_By_No import Detail_By_No

def Download_image(image_url):
    image_name=random.randint(1,99999)
    Download_url="https://ryb.kgcure.com/api/image/download"
    body="filename="+image_url
    res=requests.get(url=Download_url,params=body)
    path="E://自动化//润药宝自动购药//image"
    with open(path+"/"+str(image_name)+".jpg","wb") as f:
        for chunk in res.iter_content():
            f.write(chunk)
image_url=Detail_By_No("BJFdm20211228132731297922600")
Download_image(image_url)